<div class="row">

	<div class="col-md-12" style="padding-bottom: 15px;">
		<span>订单号：{$row.order_sn}</span>
		<span style="margin-left: 40px;">买家：{$row.user.nickname}(ID:{$row.user.id})</span>
	</div>
	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">课程信息</div>
			<div class="panel-body">
				<table class="table table-bordered">
					<thead>
						<tr>
							<th class="text-center">
								<div class="th-inner">课程ID</div>
							</th>
							<th class="text-center">
								<div class="th-inner">课程主图</div>
							</th>
							<th class="text-center">
								<div class="th-inner">课程名称</div>
							</th>
							<th class="text-center">
								<div class="th-inner">购买节量</div>
							</th>
							<th class="text-center">
								<div class="th-inner">权益抵扣节数</div>
							</th>
							<th class="text-center">
								<div class="th-inner">课程单价</div>
							</th>
							<th class="text-center">
								<div class="th-inner">课程总价</div>
							</th>
							<th class="text-center">
								<div class="th-inner">实付金额</div>
							</th>
						</tr>
					</thead>
					<tbody>
						<tr>
							<td class="text-center">{$row.id}</td>
							<td class="text-center"><img class="img-sm img-center" src="{$row.image|cdnurl|htmlentities}"></td>
							<td class="text-center"><strong>{$row.name}</strong></td>
							<td class="text-center">{$row.buy_num}</td>
							<td class="text-center">{$row.ext_text.benfit_num}</td>
							<td class="text-center">{$row.price}</td>
							<td class="text-center">{$row.total_amount}</td>
							<td class="text-center">{$row.pay_fee}</td>
						</tr>
					</tbody>
				</table>
				<div style="color: #333;">
					<p style="margin-bottom: 15px;">支付方式：
						<span class="label label-info">{$row.pay_type_text|htmlentities}</span>
					</p>
					<p style="margin-bottom: 15px;">交易状态：
						<span class="label label-info">{$row.status_text|htmlentities}</span>
					</p>
					{if condition="$row.status==-3"}
					<p style="margin-bottom: 15px;">退款时间：
						{notempty name='$row.refund_time'}
						<span>{$row.refund_time|date='Y-m-d H:i:s',###}</span>
						{else/}
						<span>{$row.updatetime|date='Y-m-d H:i:s',###}</span>
						{/notempty}
					</p>
					{/if}
					<p style="margin-bottom: 15px;">备注：
						<span>{$row.remark|htmlentities}</span>
					</p>
				</div>
			</div>
		</div>
	</div>
	
	{if($row.status == 1)}
		<div class="col-md-12" >
			<div class="panel panel-default">
				<div class="panel-heading">付款信息</div>
				<div class="panel-body">
					<table class="table table-striped">
						<tbody>
							<tr>
								<td>交易号</td>
								<td>{$row.transaction_id}</td>
							</tr>
							<tr>
								<td>付款状态</td>
								<td>{$row.status_text}</td>
							</tr>
							<tr>
								<td>付款时间</td>
								<td>{$row.paytime_text}</td>
							</tr>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	{/if}

	<div class="col-md-12">
		<div class="panel panel-default">
			<div class="panel-heading">订单状态</div>
			<div class="panel-body">
				{if condition="$auth->check('xykeep/course/order/refund')"}
				<div class="row" style="margin-top: 20px;">
					<div class="col-sm-6">
						{if($row.status == 1 || $row.status == 2 || $row.status == 3 || $row.status == 4)}
						<a href="javascript:;" style="margin-left:20px;padding: 5px 15px;" class="take-refund btn btn-info" data-id="{$row.id}"><i class="fa fa-truck"></i> 退款</a>
						{/if}
						{if($row.status==4)}
						<a href="javascript:;" style="margin-left:20px;padding: 5px 15px;" class="take-refund-back btn btn-info" data-id="{$row.id}"><i class="fa fa-truck"></i> 驳回退款申请</a>
						{/if}
					</div>
				</div>
				{/if}

			</div>
		</div>
	</div>

</div>

<div class="hide layer-footer">
	<div class="col-xs-3 col-sm-3"></div>
	<div class="col-xs-1 col-sm-1">
		<button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button>
	</div>
</div>
